//
//  NetApis.swift
//  FoundationsAppCode
//
//  Created by Erickson on 16/3/18.
//  Copyright © 2016年 paiyipai. All rights reserved.
//
import Foundation

#if DEBUG  //开发
//let kBaseApiv1URL = "http://lyl.peifubao.huayandan.net/apiv1_"
let kBaseApiv1URL = "http://supeibao.xiqiwangluo.com/apiv1_"
//let kBaseApiv1URL = "http://supeibao.cdghealth.com/apiv1_"

let kBaseApiv2URL = "http://supeibao.xiqiwangluo.com"
#else  //生产
let kBaseApiv1URL = "http://supeibao.cdghealth.com/apiv1_"

let kBaseApiv2URL = "http://supeibao.xiqiwangluo.com/picc/h5"
#endif

//------------基础接口--------------//
struct BaseApi {
    /// 获取验证码
     static let authCodeApiUrl =  kBaseApiv1URL + "code/authcode"
    /// 认证验证码
     static let certifyCodeApiUrl =  kBaseApiv1URL + "code/ckauthcode"
    /// 用户注册
     static let registerApiUrl =  kBaseApiv1URL + "Reg"
    /// 用户登录
     static let userLoginApiUrl =  kBaseApiv1URL + "Login"
    /// 修改密码 (已登录)
     static let editpwdApiUrl =  kBaseApiv1URL + "editpwd"
    /// 重置密码 （未登录忘记密码）
     static let repwdApiUrl =  kBaseApiv1URL + "repwd"
    /// 个人信息首页(`我的`展示页)
     //static let userdApiUrl =  kBaseApiv1URL + "user"
    /// 修改（个人信息修改）
     static let userEditApiUrl =  kBaseApiv1URL + "user/edit"
    /// 上传头像
     static let userEditHeadApiUrl =  kBaseApiv1URL + "user/edithead"
    /// 用户信息
     static let userMessageApiUrl =  kBaseApiv1URL + "user/info"
    /// 软件许可及服务协议
     static let agreementApiUrl =  kBaseApiv1URL + "agreement"
    /// 反馈
     static let feedbackApiUrl =  kBaseApiv1URL + "feedback"
    ///银行信息
    static let bankInfoApiUrl = kBaseApiv1URL + "user/bank"
    /**
     *  修改手机号
     */
    static let updatePhoneApiUrl = kBaseApiv1URL + "user/updatephone"

    // 投保机构
    static let insuranceApiUrl = kBaseApiv1URL + "insurance"
}

struct AppApi {
     /// Banner列表
    static let bannerApiUrl = kBaseApiv1URL + "banner/"
    static let bannerDetaiApiUrl = kBaseApiv1URL + "Banner/detail"
    //公告接口
    static let announcementApiUrl = kBaseApiv1URL + "announcement"
    /// 保单列表
    static let policyApiUrl = kBaseApiv1URL + "policy"
    ///案件初始化
    static let caseInitApiUrl = kBaseApiv1URL + "case/init"
    ///案件 - 资料上传
    static let caseUploadApiUrl = kBaseApiv1URL + "case/upload"
     /// 档案列表
    static let archivesApiUrl = kBaseApiv1URL + "Archives"
    /// 档案详情
    static let archivesDetailApiUrl = kBaseApiv1URL + "Archives/detail"
     /// 小红点
    static let caseNumberApiUrl = kBaseApiv1URL + "case/number"
    ///保单详情
    static let policyDetailApiUrl = kBaseApiv1URL + "policy/detail"
    
    ///如何申请赔付
    static let howToapplicationApiUrl = kBaseApiv1URL + "cfg/apply"
    //赔付金额
    static let  caseLoanApiUrl = kBaseApiv1URL + "case/loan"
    //案件删除
    static let resubmitApiUrl = kBaseApiv1URL + "resubmit"
}


/// 登录和注册Api
struct RegistApi {
    
    /// 短信验证码
    static let authCodeApiUrl =  kBaseApiv2URL + "/apiv1_code/authcode"
    /// 验证 短信验证码
    static let cKAuthCodeApiUrl = kBaseApiv2URL + "/apiv1_code/ckauthcode"
    /// 注册用户
    static let registUserApiUrl = kBaseApiv2URL + "/apiv1_reg"
    
    /// 个人用户登录
    static let loginApiUrl = kBaseApiv2URL + "/apiv1_login"
    
    /// 盐
    static let saltStr = "HD"
    /// 用户投保机构列表
    static let userInsurancesApiUrl = kBaseApiv2URL + "/apiv1_policy/insurance"
    /// 验证团队用户所选择投保机构
    static let verifyUserInsurancesApiUrl = kBaseApiv2URL + "/apiv1_policy/request"
    /// 获取用户数据
    static let requestUserInfoApiUrl = kBaseApiv2URL + "/apiv1_user/info"
}

/// 个人中心相关接口
struct IndividualCenterApi {
    /// 获取用户积分
    static let requestUserIntegralApiUrl = kBaseApiv2URL + "/apiv1_Integral/index"
    /// 获取用户积分明细
    static let requestUserIntegralDetailApiUrl = kBaseApiv2URL + "/apiv1_Integral/integral_detail"
    /// 获取用户中心设置页面数据
    static let requestUserSettingInfoApiUrl = kBaseApiv2URL + "/apiv1_user/info"
    /// 获取用户银行卡信息
    static let requestBanInfoApiUrl = kBaseApiv2URL + "/apiv1_user/bank"
}

/// 业务逻辑相关接口
struct BusinessApi {
    /// 获取跟踪保单数据
    static let policylistApiUrl = kBaseApiv2URL + "/apiv1_case/status"
    /// 获取保单信息数据
    static let policyInfoApiUrl = kBaseApiv2URL + "/apiv1_case/detail1"
    /// 获取info_id
    static let policyInfoIdApiUrl = kBaseApiv2URL + "/apiv1_case/info_id"
    /// 获取保单历史信息
    static let policyLogsApiUrl = kBaseApiv2URL + "/apiv1_case/log"
    /// 获取账单信息
    static let policyBillsApiUrl = kBaseApiv2URL + "/apiv1_case/mingxi"
    /// 获取保单拒绝理由
    static let policyRefuseReasonApiUrl = kBaseApiv2URL + "/apiv1_case/refuse"
    /// 获取首页广告列表
    static let bannerListApiUrl = kBaseApiv2URL + "/apiv1_banner"
    static let bannerDetailWebUrl = kBaseApiv2URL + "/apiv1_banner/detail"
    /// 获取首页声明列表
    static let announcementListApiUrl = kBaseApiv2URL + "/apiv1_announcement"
    /// 首页保单列表
    static let homePolicyListApiUrl = kBaseApiv2URL + "/apiv1_policy"
    /// 首页获取手册
    static let manualsApiUrl = kBaseApiv2URL + "/apiv1_manual"
    /// 请求被保人名单
    static let recognizeeApiUrl = kBaseApiv2URL + "/apiv1_info/list"
    /// 删除被保人
    static let deleteRecognizeeApi = kBaseApiv2URL + "/apiv1_info/delete"
    /// 增加被保人
    static let addRecognizeeApi = kBaseApiv2URL + "/apiv1_info/store"
    /// 判断是否有本人
    static let recognizeeExistSelf = kBaseApiv2URL + "/apiv1_info/existinfo"
    /// 获取本人被保人信息
    static let orzinfoApi = kBaseApiv2URL + "/apiv1_info/orzinfo"
    /// 判断当前被保人是否是本人
    static let selfinfoApi = kBaseApiv2URL + "/apiv1_info/selfinfo"
    /// 申请赔付案件初始化
    static let caseinitApi = kBaseApiv2URL + "/apiv1_case/init"
    /// 获取案件默认被保人
    static let caseDefaultUserInfo = kBaseApiv2URL + "/apiv1_info/userinfo"
    ///
    static let infoAddPartone = kBaseApiv2URL + "/apiv1_info/useraddpartone"
    /// 获取案件第二张表单内容
    static let requestParttwo = kBaseApiv2URL + "/apiv1_info/userinfotwo"
    /// 更新案件第二张表单内容
    static let updateParttwo = kBaseApiv2URL + "/apiv1_info/useraddparttwo"
    /// 请求申请赔付第三张表单上传的的身份证图片
    static let requestPartoneIdPic = kBaseApiv2URL + "/apiv1_info/partoneidpic"
    /// 上传案件图片地址
    static let uploadCaseImage = kBaseApiv2URL + "/apiv1_case/upload"
    /// 请求案件附件
    static let requestArchivesDetail = kBaseApiv2URL + "/apiv1_archives/detail"
    /// 上传案件图片
    static let requestUploadImages = kBaseApiv2URL + "/apiv1_case/uploadmistiness"
    ///放弃补充理财资料
    static let requestSupplyGiveUp = kBaseApiv2URL + "/apiv1_case/uploaddrop"

    /// 获取电子申请表
    static let requestApplicationForm = kBaseApiv2URL + "/apiv1_info/userinfodetail"

    ///请求案件申诉记录
     static let requestArchiveRecord = kBaseApiv2URL + "/apiv1_case/recordlog"
    ///请求账单明细
    static let requestArchiveBill = kBaseApiv2URL + "/apiv1_case/mingxi"
    /// 请求赔案通知书（web）
    static let requestArchiveBook = kBaseApiv2URL + "/picc/h5/pdf_view.html?case_id="
    ///删除案件
    static let requestArchiveDelete = kBaseApiv2URL + "/apiv1_case/delete"
    /// 放弃案件
    static let closeCase = kBaseApiv2URL + "/apiv1_case/close"
}

